<?php

class NoSpacesValidator extends sfValidatorRegex
{
  const PATTERN = '/^[^\s]+$/';

  public function configure($options = array(), $messages = array())
  {
    parent::configure($options, $messages);

    $this->options['pattern'] = self::PATTERN;
    $this->messages['invalid'] = 'Nu sunt permise spaţii.';
  }

}
